function createFindUploader() {
    var thumbnailuploader = new qq.FineUploader({
        //template: "qq-simple-thumbnails-template",
        element: document.getElementById("thumbnail-fine-uploader"),
        request: {
            endpoint: '/Default/File/Upload'
        },
        validation: {
            //allowedExtensions: ['jpeg', 'jpg', 'gif', 'png', 'bmp']
        },
        callbacks: {
            onComplete: function (id, fileName, result) {
                if (result.success) {
                    $("input[name='FileItemID']").val(result.fileItemID);
                    $("#uploadForm").submit();
                }
                else {
                    alert(result.message);
                };
            }
        },
        debug: true,
        demoMode: false // Undocumented -> Only for the gh-pages demo website
    });
};

$(function () {
    createFindUploader();
});

